HVSª JPEG 2.0 Electronic Edition User Guide 

Digital Frontiers
1206 Sherman Ave.
Evanston, IL 60202
847.328.0880
http://www.digfrontiers.com

Overview
Congratulations on your purchase of Digital FrontiersÕ HVSª JPEG 2.0! You now have at your disposal a sophisticated professional tool for creating JPEG images of the highest quality and smallest size. HVS JPEGÕs proprietary Human Visual Systemsª-based image-processing algorithms are unmatched in the industry for their ability to optimize compression and quality. The HVS algorithms are the product of years of research devoted to modelling human visual perception to optimize the digital representation of images. Dr. Richard Bruno, Chairman of Digital Frontiers, was a member of the ISO JPEG Committee.

Installation
HVS JPEG 2.0 is implemented as a Photoshop 3.0 and 4.0-compatible filter plug-in. It can be run with any application that supports the basic Photoshop 3.0 filter standard, including most major paint programs on the Macintosh and Windows platforms. 

HVS JPEG 2.0 is somewhat unusual in that it is a filter as opposed to a file format or export plug-in. Most non-Photoshop image editors support the filter standard, but very few support the file format and export standards. As a filter, HVS JPEG runs on the widest possible variety of hosts, and is easily accessed.

To install HVS JPEG 2.0, you should first determine the location of your filter plug-ins directory for your paint program. For example, Photoshop users would typically find a directory named PlugIns under the main Photoshop directory. That would be the target directory for installing the HVS JPEG plug-in.

To Install HVS JPEG 2.0:
1. Determine the location where your paint program looks for filter plug-ins. Most paint programs have a Preferences setting for the location of this directory. ItÕs very important to make sure you put the filter in the proper directory, or it wonÕt show up on the menu.

2. (Mac) Drag the files HVSJPEGFilterFat and HVSJPEG.HLP to your PlugIns:Filters folder.   
(Windows 95) In Windows Explorer, drag the HVSJPEG filter (with a .8BF extension) and the help file (HVSJPEG.HLP) to the directory containing filter plug-ins.

3. Restart your paint program. HVS JPEG should be visible on the menu for filter plug-ins.

4. HVS JPEG 2.0 includes this file in both a text version and an Adobe Acrobat file containing an online hyperliinked version of the manual (HVSJPEG.PDF). If you donÕt have Acrobat Reader you can download it from the Digital Frontiers web site, http://www.digfrontiers.com.

Registering a RoadTest Version
The RoadTest version of HVS JPEG 2.0 allows you to try the plug-in for a limited time period, after which the Export feature will be disabled. To enable the full feature set after the trial period expires, you must use the Registration button to submit payment for the full product. You will also be able to order other products from the Digital Frontiers catalog when you register.
 
The registration screen allows you to submit payment via the Internet, via modem, over the telephone, fax, or through conventional mail. If you register electronically, an unlocking code will be returned following the processing of your credit card, and the full feature set will immediately be accessible. 
 
See the Digital Frontiers site at http://www.digfrontiers.com for details.

The Human Visual Systems Approach
HVS JPEG is one of a series of tools that incorporate Digital FrontiersÕ proprietary HVSª (Human Visual Systems) technology. HVS is analogous to the DolbyÒ (a registered trademark of Dolby Labs) technology that is used inside most tape decks - it is a proprietary signal processing mechanism that provides superior quality even when information is lost via compression or other means. When you see the HVS trademark on a product, it means that the product vendor has licensed HVS algorithms as a means of providing higher quality to the end user. HVS provides the following benefits:

¥ Improved Signal-to-noise Ratio.
¥ Significant improvements in compression (30%-200% is typical).
¥ More accurate rendition of color space even with limited palettes.
¥ Higher perceived image quality.
¥ Greatly improved download times stemming from compression improvements.

HVSª ColorGIF 2.0
Another Digital Frontiers product, HVSª ColorGIF 2.0, provides similar benefits using the 8-bit GIF image format. HVS Color Version 1 has become a widely recommended tool for Web designers, and earned a 5-star rating (top) from Publish magazine in the January, 1997 issue.
HVS technology is becoming a significant factor in improving image quality and download times on the Web. In recognition of these benefits to the Internet community, New Media Magazine gave HVS products the 1997 Hyper Award for Best Graphics Utility. Digital Frontiers is grateful for this recognition, and we are working to develop more exciting products in the HVS series.

HVS JPEG 2.0
HVS JPEG 2.0 combines an industry-standard progressive JPEG encoder with HVS preprocessing techniques that allow image designers to export JPEGs with unrivaled quality and compression. Some of the proprietary enhancements unique to HVS JPEG include:

¥ Edge-preserving frequency-based prefilters.
¥ Automatic tuning of preprocessing based on perception characteristics of the human eye in combination with image data.
¥ Optimized Q-tables for several image types (portraits, textures, etc.)
¥ Automatic Q-table generator for the best possible compression at a given quality level. 
¥ Superior HVS sub-sampling filters.

 Getting Started with HVS JPEG 2.0
	JPEG Principles
		How JPEG Compresses Images
JPEG uses a number of techniques to compress the image. Most importantly, the image data is converted into frequencies, or rates of change, as opposed to absolute values of color and luminosity. For this reason, the effectiveness of JPEG is very dependent upon what frequencies are present in an image. Images that donÕt change much, and have smooth shading, compress better than images with a lot of sharp color changes (for example, random textures such as concrete). 

JPEG was developed for use with photographs. In principle, it does best with natural images in which random color disturbances would be masked by the natural randomness of the image. JPEGÕs compression ratio is variable. When you save a JPEG image you tell it how much quality youÕre willing to sacrifice, and it determines how much compression is possible.

JPEG vs. GIF
JPEG is not generally a good choice for very precise images in which maintaining the integrity of sharp detail is critical. Synthetically constructed images (like ad banners, logos and buttons on a Web page) will tend to show JPEGÕs faults much more than natural images. GIF is a better compression strategy for these images, because it doesnÕt modify image structure to compress the data. However, GIFs require that the color space of the image be reduced from 24 bits to 256 colors or less. Normal dithering algorithms often produce poor color matches and visible defects, along with inferior compression. Digital FrontiersÕ HVSª ColorGIF 2.0 allows you to create GIFs that achieve maximum compression while maintaining 24-bit color accuracy. Please visit the Digital Frontiers web site at http://www.digfrontiers.com for details and online purchasing.

Using the HVS JPEG Filter
To start HVS JPEG, load a 24-bit RGB image into the host program. Go the menu showing filter plug-ins (in Photoshop this is the Filter menu) and you should see an HVS Filters item. In some applications, HVS plug-ins will be listed under Other. Select HVS JPEG 2.0, and you will see the main HVS JPEG dialog.

Previewing the Image
After you start the HVS JPEG filter, you will see the main dialog. The dialog is divided into several major sections. In the upper right is a preview of your image as it will look at the current setting, with size and compression estimates below (Note:you must have Show Compressed checked or you will only see the RGB image.) Whenever you change one of the settings, the preview will re-display the image and the compression estimates. This allows you to make decisions in real time about how much to compress the image. 
The download time estimate gives you an idea of how long in seconds the image will take to download at the current compression setting. This is an average value based on a 28.8 modem, and it could vary considerably depending on the quality of the link, how busy the server is, and so on.

The Quality/Compression Tradeoff
In order to optimize a JPEG, you need to be able to see how far you can push compression before an unacceptable level of image degradation occurs. JPEG compresses by throwing information away - which is why it is classified as a ÒlossyÓ compression method. You tell the JPEG encoder roughly how much quality you want to keep in the image, and then you see how much compression it was able to achieve. This might seem a bit indirect, and it is. Because of the way JPEG was designed, you never really know how much compression is going to result from a given quality (ÒQÓ) setting. HVS JPEGÕs live preview and compression estimation make it easy for you to interactively set the quality value and see what happens to compression.

JPEGÕs ÒQÓ or quality setting (which you can change with the slider below the preview window) is just an arbitrary number between 1 and 100 that is sort of like the gas pedal in a car. If you push the pedal down halfway, you donÕt really know how fast the car will go - it depends on a lot of factors like how much weight is in the car, whether youÕre going uphill, and so on. You push the pedal down, and then you fine-tune the speed by observing what happens.

But first, try changing the Q slider and see what effect it has on your image. If you push it all the way to the left, your image will probably look pretty bad, but if you look at the compression it will be very high (better than 50-1). If you move the Q slider to the right, the image will look a lot better but the compression wonÕt be nearly as good. 

Many JPEG encoders only allow you to control the Q value and hope for the best. With HVS JPEG, you get immediate feedback as to image quality and compression, and you have a number of tools that allow you to tune and optimize the encoding to get the best results. However, even if you choose not to use any of the tools, HVS JPEG 2.0 still uses its normal quality enhancement algorithms to achieve superior results.

To set the Q value, first move it to the left to a position that doesnÕt look good. Then start moving the slider back to the right in small increments until you settle on a position in which the image quality looks acceptable to you. This is the Q value that will allow the encoder to compress the image as much as possible without sacrificing too much quality. A good way to spot artifacts is to use the Show Compressed checkbox to toggle back and forth between the original and the compressed image.

Exporting an Image
Move the Q Setting slider to a position that provides a quality level that is just acceptable. Notice what the compression value is. Hit the Export button, and you will see a standard File Save dialog. Name your file, and select Save. You have now exported the image as a JPEG file. 
If you look at the image size on disk, remember that you should look at the exact number of bytes used in the file (and on Macintoshes only the data fork size is important - the resource fork is not transmitted when the image is viewed). The image size will be close to the estimated size, but will probably be different - HVS JPEG does a quick estimate rather than taking the time to recompress the entire image every time you change a setting.

The HVS JPEG filter is output-only, meaning that it allows you to export the current image as a JPEG file, but doesnÕt alter the image in Photoshop in any way. Your original RGB source image is still untouched, and you can export it again to JPEG without closing and reopening the image.

Using Advanced HVS JPEG Features
	Selecting Progressive Display
If your image is going to be viewed via modem or internet connection, you will probably want to select the Progressive check box. This allows the browser to show the user a rough view of the image and progressively enhance it as the image is downloaded. Most browsers now support Progressive JPEG, but there are still some that donÕt.

	Pre-filtering
One of the unique optimization tools that HVS JPEG provides is an intelligent pre-filter. The compression ratio that JPEG is able to achieve for a given quality level is highly dependent upon the image data. Images that have a lot sharp detail are much tougher on JPEG than images with simpler color structure. Areas of the image with a lot of dramatic color changes are likely to exhibit artifacts, or defects, when compression is pushed past a certain level depending upon the image. ÒRingingÓ is a familiar JPEG artifact that causes untrue color rendering in very noticeable areas, such as edges.

The eye notices edges, or sharp discontinuities in color and brightness, much more than texture. Texture is a subtlety that can often be simplified without sacrificing much in terms of image quality. HVS JPEGÕs intelligent pre-filtering allows you to simplify and smooth the busy areas of your image without disturbing edges. This allows you to push compression to a higher level without seeing disturbing artifacts.

To see what pre-filtering does, go to the two sliders in the Pre-filtering section of the dialog box. If your image has a lot of fine detail that is important, select ÒSharp DetailÓ. This will set the filter so that it only filters out the finest detail, but leaves most of it in the image. If you select ÒSoft DetailÓ, the filter will use its most aggressive approach in determining what to filter and what to preserve. On this setting, many images will show undesirable blurring.  Move the Strength slider and see what effect it has on your image. Moving it to the right should cause the fine image detail to become more and more indistinct. If either slider is all the way to the left, no pre-filtering will occur.

After youÕve selected the level of filtering you want, adjust the Q Setting slider to come up with the best compromise between image quality and compression. Each time you change filtering or the Q-Table setting, you should go back to the Q slider. Hopefully, the proper filtering and Q-Table settings will enable you to set Q to a lower level (meaning higher compression) and still have acceptable visual quality.

You should set the proper filter value for the image before you modify the Q-Table setting. Pre-filtering means that the filtering operation happens before anything else, and gives the rest of the encoding process filtered data so it can do a better job.

	Optimizing the Q-Table
JPEG encoders use a table to determine how they will process various aspects of the image. Most encoders use a default Q-Table and have no ability to use tables customized for the image or image type. HVS JPEG provides both Q-Tables hand-tuned for broad classes of images and the ability to automatically generate a Q-Table customized for the current image and desired level of compression.

The colored icons on the left side allow you to select the Q-Table option that is most appropriate. The default Q-Table can be selected by clicking on the ÒGeneralÓ icon. This will provide good, if not optimal, results on most images. 

For portraits or other images with a lot of smooth tone, ÒPortraitsÓ will give superior results. This emphasizes the smooth tonal transitions of the image and de-emphasizes sharp detail.

The ÒTextureÓ icon gives good results with natural and still-file scenes in which fine texture is important. 

For the best possible results (at the expense of a longer wait) the ÒGenerate Optimized Q-TableÓ button analyzes the image and produces the Q-Table that will retain the most quality for that level of compression.

With the Optimized Q-Table button selected, some operations will take a good deal longer. If you change a parameter that causes a re-computation of the optimum Q-Table, you will notice a pause as the optimizer generates a new Q-Table. When it returns, try setting the Q slider to a lower quality value - you will probably find that you can compress the image more than before generating the optimized table. This wonÕt be true with all images. You might find that on some images one of the pre-built Q-Tables gives equal or better results. 

	Batch Processing
HVS JPEG 2.0 can be used to process multiple images using PhotoshopÕs ÒCommand-FÓ feature or the batch processing capabilities present in Photoshop 4.0. If the filter is invoked in either of these modes, it assumes that you want to save an image with the same parameters as the last image except for the file name. Each invocation will use the last file name, plus a numeric field that will be incremented by 1. For example, if the last file name was ÒFRED.JPGÓ, invoking the filter automatically will save the next file as ÒFRED0001.JPGÓ. If the last file was named ÒECLIPSE0039.JPGÓ, the next one will be ÒECLIPSE0040.JPGÓ, and so on.

In order to set the JPEG compression parameters accurately, invoke the filter manually and modify the settings to produce acceptable levels of compression and quality. Save an image using the ÒbaseÓ file name (in our examples, ÒFRED.JPGÓ or ÒECLIPSE.JPGÓ), and then run the batch. HVS JPEG will place the batched files in the same directory as the base file. Note that if files by the current name already exist, they will be overwritten. 

Technical Support
Free technical support is available to registered users for the first 30 days, and 3 support incidents thereafter. Support and consulting plans are available for users who require more in-depth assistance.  Registered users may visit the Digital Frontiers web site at http://www.digfrontiers.com to review and post tech questions on the Customer Support Board, an archive of HVS tech info. When prompted for user name and password, enter your Digital Frontiers Customer ID in both fields. If you purchased your product via catalog or via the Web, you can call 847-328-0880 or fax proof of catalog purchase to 847-869-2053 to receive your Customer ID. The 5-digit ID assigned during web purchases cannot be used for this purpose - you need to get your Digital Frontiers ID, which is generally 4 or more alpha characters plus some digits.

If for some reason you cannot access the Customer Support Board, you may send tech questions to support@digfrontiers.com.

HVS RoadTest
The HVS RoadTest program allows you to download working trial versions of HVS products from the Digital Frontiers web site. If you like the product, you can purchase it from within the product itself via modem or internet connection, or via fax or phone. An unlocking code will be returned so you have permanent use of the full feature set of the product. Please visit http://www.digfrontiers.com or email info@digfrontiers.com for details.